<ion-view view-title="招商代理" class="agent">
	<!--一定要手动加导航栏-->
	<ion-nav-bar>
		<ion-nav-back-button>
		</ion-nav-back-button>
	</ion-nav-bar>
	<!--通过副标题来定位-->
	<div id="agent-top1" class="bar bar-subheader line-bottom padding-0">
		<!--描述：顶部模块-->
		<div class="row top">
			<!--<div class="col" ng-click="activeSlide(0)" ng-class="selectIndex==$index?'top-activated':''">
				找授权中心
			</div>
			<div class="col" ng-click="activeSlide(1)" ng-class="selectIndex==$index?'top-activated':''">
				找加盟店
			</div>-->
			<div class="col" ng-click="activeSlide(2)" ng-class="selectIndex==2?'top-activated':''">
				我要入驻
			</div>
			<div class="col" ng-click="activeSlide(3)" ng-class="selectIndex==3?'top-activated':''">
				我要加盟
			</div>
			<div class="col col-20 padding-0" ng-click="rightSideMenu()">
				<span>筛选
					<i class="iconfont icon-shaixuan"></i>
				</span>
			</div>
		</div>
	</div>

	<!-- 侧边菜单 -->
	<ion-side-menus>
		<!-- 中间内容 -->
		<ion-side-menu-content>
			<!--描述：滑动块-->
			<ion-content scroll="false">
				<!--描述：地图显示-->
				<!--<div id="amap" class="amap" >
					<div id="container"></div>
				</div>-->
				<!--描述：滑动块-->
				<ion-slide-box delegate-handle="tab-handle" on-touch="onTouch()" on-release="onRelease()" on-slide-changed="slideChanged(index)"
				 active-slide="slideIndex" show-pager="false" style="padding-top: 44px;">

					<!--描述：找授权中心，不能注释，否则selectIndex就不对应了-->
					<ion-slide>
						<ion-scroll direction="y" ng-style="agent_myObj" lazy-scroll>
							<ion-refresher pulling-text="下拉刷新..." on-refresh="doRefresh()"></ion-refresher>
							<div class="list apply">
								<div class="font-large-my font-gray-my text-center padding" ng-if="listData_agent.agenterdemand.length==0||listData_agent.agenterdemand==null">
									<i class="icon ion-sad-outline font-1rem-my"></i> 对不起，没有符合条件的数据.....
								</div>
								<div class="item " ng-repeat="obj in listData_agent.agenterdemand" ng-click="showPopup_detail(0,$index)">
									<h2>{{obj.region_name}}
										<span class="tag">
											<i class="iconfont icon-dailizhaopin"></i>{{obj.brand_name}}</span>
									</h2>
									<p class="man">发布者：{{obj.store_name}}</p>
									<p class="num">
										<span>
											空缺家数：{{obj.surplus}}
										</span>
										<span class="bian_red border-radius-my assertive right-zhang" style="padding: 0px 5px;" ng-show="!obj.is_apply" ng-click="show_apply(obj.info_id,obj.store_name,4)">我要申请</span>
										<span class="tag border-radius-my  right-zhang" style="padding: 0px 5px;background: #7e7e7e;color: white;font-size: 50%;"
										 ng-show="obj.is_apply">已经申请</span>
									</p>
									<p class="man">发布时间：{{obj.release_time}}</p>
								</div>
							</div>
							<ion-infinite-scroll ng-if="!isLoad" immediate-check="false" on-infinite="doRefreshMore()" distance="1%"></ion-infinite-scroll>
						</ion-scroll>
					</ion-slide>

					<!--描述：找加盟店-->
					<ion-slide>
						<ion-scroll direction="y" ng-style="agent_myObj" lazy-scroll>
							<ion-refresher pulling-text="下拉刷新..." on-refresh="doRefresh()"></ion-refresher>
							<div class="list apply">
								<div class="font-large-my font-gray-my text-center padding" ng-if="listData_agenter.agenterdemand.length==0||listData_agenter.agenterdemand==null">
									<i class="icon ion-sad-outline font-1rem-my"></i> 对不起，没有符合条件的数据.....
								</div>
								<div class="item " ng-repeat="obj in listData_agenter.agenterdemand" ng-click="showPopup_detail(1,$index)">
									<h2>{{obj.region_name}}
										<span class="tag">
											<i class="iconfont icon-dailizhaopin"></i>{{obj.brand_name}}</span>
									</h2>
									<p class="man">发布者：{{obj.store_name}}</p>
									<p class="num">
										<span>空缺家数：{{obj.surplus}}</span>
										<span class="bian_red border-radius-my assertive right-zhang" ng-if="!obj.is_apply" style="padding: 0px 5px;" ng-click="show_apply(obj.info_id,obj.store_name,3)">我要申请</span>
										<span class="tag border-radius-my  right-zhang" style="padding: 0px 5px;background: #7e7e7e;color: white;font-size: 50%;"
										 ng-if="obj.is_apply">已经申请</span>
									</p>
									<p class="man">发布时间：{{obj.release_time}}</p>
								</div>
							</div>
							<ion-infinite-scroll ng-if="!isLoad" immediate-check="false" on-infinite="doRefreshMore()" distance="1%"></ion-infinite-scroll>
						</ion-scroll>
					</ion-slide>

					<!--描述：代理信息-->
					<ion-slide>
						<ion-scroll direction="y" ng-style="agent_myObj" lazy-scroll>
							<!--描述：下拉刷新-->
							<ion-refresher pulling-text="下拉刷新..." on-refresh="doRefresh()"></ion-refresher>
							<!--描述：代理信息-->
							<div class="font-large-my font-gray-my text-center padding" ng-if="push_agent.agentpush.length==0||push_agent.agentpush==null">
								<i class="icon ion-sad-outline font-1rem-my"></i> 对不起，没有符合条件的数据.....
							</div>
							<div class="list infos" ng-repeat="list in push_agent.agentpush">
								<div class="item">
									<div class="head assertive line-bottom font-small-my">
										<span>申请品类：{{list.cat_type_name}}</span>
										<button class="button button-small button-outline button-assertive" ng-click="do_order_tel(1,list.phone)">联络</button>
									</div>
									<div class="info">
										<span class="info-title">申请描述：</span>
										<div class="info-note ellipsis-3">{{list.requirement}}</div>
									</div>
									<div class="type-box">
										<div class="inner-box">
											<p>
												<i class="icon ion-person"></i>申请商：{{list.store_name}}</p>
											<p>
												<i class="icon ion-ios-alarm-outline"></i>发布时间：{{list.release_time}}</p>
											<p>
												<i class="icon ion-ios-location"></i>代理地域：{{list.region}}</p>
											<p>
												<i class="icon ion-ios-location"></i>预投资金额:{{list.investment_funds|currency:'￥'}}元</p>
											<!--<p><i class="icon ion-ios-location"></i>联系人：{{list.contact}} </p>-->
											<p>
												<i class="icon ion-ios-location"></i>联系方式：{{list.phone}} </p>
										</div>
									</div>
								</div>
							</div>
							<!--描述：当用户到达页脚或页脚附近时-->
							<ion-infinite-scroll ng-if="!isLoad" immediate-check="false" on-infinite="doRefreshMore()" distance="1%"></ion-infinite-scroll>
						</ion-scroll>
					</ion-slide>

					<!--描述：招商信息-->
					<ion-slide>
						<ion-scroll direction="y" ng-style="agent_myObj" lazy-scroll>
							<!--描述：下拉刷新-->
							<ion-refresher pulling-text="下拉刷新..." on-refresh="doRefresh()"></ion-refresher>
							<div class="font-large-my font-gray-my text-center padding" ng-if="push_agenter.agentpush.length==0||push_agenter.agentpush==null">
								<i class="icon ion-sad-outline font-1rem-my"></i> 对不起，没有符合条件的数据.....
							</div>
							<div class="list infos" ng-repeat="list in push_agenter.agentpush">
								<div class="item">
									<div class="head assertive line-bottom font-small-my">申请品类
										<span>：{{list.cat_type_name}}</span>
										<button class="button button-small button-outline button-assertive" ng-click="do_order_tel(2,list.phone)">联络</button>
									</div>
									<div class="info">
										<span class="info-title">申请描述：</span>
										<div class="info-note ellipsis-3">{{list.requirement}}</div>
									</div>
									<div class="type-box">
										<div class="inner-box">
											<p>
												<i class="icon ion-person"></i>申请商：{{list.store_name}}</p>
											<p>
												<i class="icon ion-ios-alarm-outline"></i>发布时间：{{list.release_time}}</p>
											<p>
												<i class="icon ion-ios-location"></i>代理地域：{{list.region}}</p>
											<p>
												<i class="icon ion-ios-location"></i>预投资金额:{{list.investment_funds|currency:'￥'}}</p>
											<!--<p><i class="icon ion-ios-location"></i>联系人：{{list.contact}} </p>-->
											<p>
												<i class="icon ion-ios-location"></i>联系方式：{{list.phone}} </p>
										</div>
									</div>
								</div>
							</div>
							<!--描述：当用户到达页脚或页脚附近时-->
							<ion-infinite-scroll ng-if="!isLoad" immediate-check="false" on-infinite="doRefreshMore()" distance="1%"></ion-infinite-scroll>
						</ion-scroll>
					</ion-slide>
				</ion-slide-box>
			</ion-content>
		</ion-side-menu-content>

		<!-- 右侧菜单 -->
		<ion-side-menu side="right">
			<!-- 搜索条件 -->
			<ion-content style="padding-top: 44px;" ng-click="get_brand()">
				<div class="list" style="margin-top: 8px;padding: 0.5rem;">
					<label class="item item-input">
						<i class="icon ion-search placeholder-icon"></i>
						<input type="text" placeholder="输入关键字" ng-model="scope.key">
					</label>
					<div class="item item-input item-select" ng-show="selectIndex<2" data-tap-disabled="true" style="padding:0 30px 0 15px;">
						<div class="input-label">品牌</div>
						<div class="input-value" ng-click="doSelectBrand()">{{scope.brand_select.name}}</div>
					</div>
					<div class="item item-input item-select" data-tap-disabled="true" style="padding:0 30px 0 15px;">
						<div class="input-label">品类</div>
						<div class="input-value" ng-click="doSelectCat1()">{{input.cat1.name}}</div>
					</div>
					<div class="item item-input item-select" data-tap-disabled="true" style="padding:0 30px 0 15px;">
						<div class="input-label"></div>
						<div class="input-value" ng-click="doSelectCat2()">{{input.cat2.name}}</div>
					</div>
					<div class="item item-input item-select" data-tap-disabled="true" style="padding:0 30px 0 15px;">
						<div class="input-label"></div>
						<div class="input-value" ng-click="doSelectCat3()">{{input.cat3.name}}</div>
					</div>
					<div class="item item-input item-select" data-tap-disabled="true" style="padding:0 30px 0 15px;">
						<div class="input-label">地域</div>
						<div class="input-value" ng-click="doSelectProvince()">{{input.province.name}}</div>
					</div>
					<div class="item item-input item-select" data-tap-disabled="true" style="padding:0 30px 0 15px;">
						<div class="input-label"></div>
						<div class="input-value" ng-click="doSelectCity()">{{input.city.name}}</div>
					</div>
					<div class="item item-input item-select" data-tap-disabled="true" style="padding:0 30px 0 15px;">
						<div class="input-label"></div>
						<div class="input-value" ng-click="doSelectDistrict()">{{input.district.name}}</div>
					</div>
				</div>
				<div class="row">
					<div class="col">
						<button class="button button-full button-energized" ng-click="doCancel()">取消</button>
					</div>
					<div class="col">
						<button class="button button-full button-assertive" ng-click="doSearch()">确定</button>
					</div>
				</div>
			</ion-content>
		</ion-side-menu>
	</ion-side-menus>

	<!--弹窗，通过点击控制-->
	<div ng-hide="isHide" class="kuang_zhang padding">
		<div ng-include="'templates/worldservice/apply_template.html'"></div>
	</div>

	<!--透明背景，当弹窗出现时，该背景也跟着出现，通过点击控制-->
	<div ng-hide="isHide" class="touming_zhang" ng-click="hide_apply()"></div>
</ion-view>